﻿public class Singleton<T>
    where T : new()
{

    protected Singleton() { }

    public static T singleton
    {
        get
        {
            if (m_singleton == null)
            {
                m_singleton = new T();
            }
            return m_singleton;
        }
    }
    private static T m_singleton = default(T);
}
